home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-07-07 | 3.7 KB | 65 lines | [TEXT/R*ch] |
- AutoRoute
- Copyright 1994 by Apple Computer, Inc. All rights reserved.
- by J. Christopher Bell
-
- This sample code illustrates how you can mail, print, fax, and beam without
- a protoActionButton. You must set up certain fields and utilize a few tricks
- to set up the fields frame properly for each category. Also, the sample code
- is written to take advantage of putAway scripts so you can see how to
- implemented some "automatic action" when you receive things in your inbox.
- You will probably want to read the documentation for Send() in the NTK
- Platforms File release notes for more information on how to AutoRoute.
-
- Note that there is a checkbox to determine if the AutoRoute code should try
- to "connect" to the inbox, and a checkbox to determine if the AutoRoute code
- should try to hide the outbox.
-
- If "send/connect now" is unchecked, items will be "posted" to the outbox but
- not sent. When things are posted to the outbox, it takes care of installing
- items into the outbox soup, updating the outbox window, and makes sure any
- details about the outbox are taken care of. You should only post things to
- the outbox using the code enclosed.
-
- If "hide outbox" is unchecked, the AutoRoute code tries to "lock" the screen
- during all the outbox stuff. If you chose to check the "send/connect now"
- checkbox, be sure you realize that input/output can still occur after the
- Send() function returns. For instance, you could "autofax" something which
- seems to take 3 seconds, but if you close AutoRoute and open the outbox, you
- will see that it is still faxing the item. You can use AutoRoute's "i/o busy"
- indicator to see if the Newton communications system is busy. In some cases,
- the Newton might beep to indicate that it did not immediately connect. For
- instance, doing two "auto-print" actions with the "send now" option, one
- after one another with no delay will cause an error during the second
- "connect" message (it will be in the outbox but it will not be sent).
-
- To see how/where you could set up custom routing info for use in different
- types of routing, see the :SetupMyData() method of the application. To see
- how each category of routing does the tricky stuff, see the methods called
- AutoFax, etc.
-
- This sample also shows how to use the protoPrinterChooserButton properly,
- including how to set and get userconfiguration settings in a safe way,
- which is required to use the protoPrinterChooserButton currently. Note that
- we display the temporary 'printer setting' for the item in a static text which
- updates itself regularly, to show you when the temporaryPrinterSetting is
- modified by the protoPrinterChooserButton. The "forDebug" line at the bottom is
- intended to show you that the actual userconfiguration.currentPrinter setting
- is modified while the printerchooser is visible. Because of this, you should not
- have the printerChooserButton visible except when necessary, or else you could
- interfere with other applications printer settings. Note that if you want to
- save the printer frame in a soup, you can do it but you should treat it as a
- "black box". Do not try to look in or modify *any* slots in this frame. The
- only legitimate way of getting a printer frame is to get it using the
- GetUserConfig('currentPrinter) function (check the Platforms File release notes
- for more information). As the AutoRoute sample does, you can use the
- GetPrinterName function to get the name of the printer from the PrinterFrame.
-
- Note that several statictext items use Idle scripts to report low level status
- information. In your own application, you should not use Idle scripts like this
- because it will greatly reduce battery life. They are intended for debugging use
- only.
-
- J. Christopher Bell
- Jul 6, 1994 5:27 PM
- PIE Developer Technical Support
-